package 案例;

import java.io.*;
import java.util.Scanner;

public class Demo_4 {
    public static void main(String[] args) {
        try(InputStream inputStream = new FileInputStream("./AAA1.txt");
            OutputStream outputStream = new FileOutputStream("./AAA.txt");
            Scanner scanner = new Scanner(inputStream);
            PrintWriter printWriter = new PrintWriter(outputStream)){

            while(scanner.hasNextLine()){
                String s = scanner.nextLine();
                printWriter.println(s);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
